@tailwind base;
@tailwind components;
@tailwind utilities;

* {
  scrollbar-width: thin;
  /* Make the scrollbar narrower */
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  /* Thumb and track colors */
}



#root {
  overflow: hidden;
}

.bg-grid {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='8' height='8' fill='none' stroke='rgb(0 0 0 / 0.1)'%3e%3cpath d='M0 .5H31.5V32'/%3e%3c/svg%3e");
}

/* fix prism code wrap */
pre[class*="language-"],
code[class*="language-"] {
  /* white-space: normal !important; */
  overflow: auto;
  word-break: break-word !important;
  font-size: 0.75rem !important;
  line-height: 1.25rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

html {
  font-size: 16px;
}

#title-bar {
  margin-left: env(titlebar-area-x, 0);
  margin-top: env(titlebar-area-y, 0);
  height: env(titlebar-area-height, 32px);
  width: env(titlebar-area-width, 100%);
  z-index: 9;
}

#title-bar-mac {
  margin-top: env(titlebar-area-y, 0);
  height: env(titlebar-area-height, 32px);
  width: env(titlebar-area-width, 100%);
  z-index: 9;
}

.drag-region {
  -webkit-app-region: drag;
}

#drag-region {
  -webkit-app-region: drag;
}

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 224 71.4% 4.1%;

    --muted: 220 14.3% 95.9%;
    --muted-foreground: 220 8.9% 46.1%;

    --popover: 0 0% 100%;
    --popover-foreground: 224 71.4% 4.1%;

    --border: 220 13% 91%;
    --input: 220 13% 91%;

    --card: 0 0% 100%;
    --card-foreground: 224 71.4% 4.1%;

    --primary: 220.9 39.3% 11%;
    --primary-foreground: 210 20% 98%;

    --secondary: 220 14.3% 95.9%;
    --secondary-foreground: 220.9 39.3% 11%;

    --accent: 220 14.3% 95.9%;
    --accent-foreground: 220.9 39.3% 11%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 20% 98%;

    --ring: 224 71.4% 4.1%;

    --radius: 0.5rem;

    --token-comment-color: #6c757d;
    --token-punctuation-color: #999;
    --token-property-color: #905;
    --token-selector-color: #690;
    --token-operator-color: #9a6e3a;
    --token-attr-color: #07a;
    --token-variable-color: #e90;
    --token-function-color: #dd4a68;

    /* monaco editor */
    --custom-editor-background: hsl(var(--background));

    /* --rhm */
    --rhm-rect: #ebedf0;
    --rhm-text-color: #24292e;
    --rhm-rect-hover-stroke: rgba(0, 0, 0, 0.14);
    --rhm-rect-active: #196127;
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
    --sidebar: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  .dark {
    --background: 224 71.4% 4.1%;
    --foreground: 210 20% 98%;

    --muted: 215 27.9% 16.9%;
    --muted-foreground: 217.9 10.6% 64.9%;

    --accent: 215 27.9% 16.9%;
    --accent-foreground: 210 20% 98%;

    --popover: 224 71.4% 4.1%;
    --popover-foreground: 210 20% 98%;

    --border: 215 27.9% 16.9%;
    --input: 215 27.9% 16.9%;

    --card: 224 71.4% 4.1%;
    --card-foreground: 210 20% 98%;

    --primary: 210 20% 98%;
    --primary-foreground: 220.9 39.3% 11%;

    --secondary: 215 27.9% 16.9%;
    --secondary-foreground: 210 20% 98%;

    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 20% 98%;

    --ring: 216 12.2% 83.9%;

    --radius: 0.5rem;

    --token-comment-color: #6c757d;
    --token-punctuation-color: #999;
    --token-property-color: #d19a66;
    --token-selector-color: #c678dd;
    --token-operator-color: #a9a9a9;
    --token-attr-color: #56a8a8;
    --token-variable-color: #e09062;
    --token-function-color: #cb6d90;

    /* monaco editor */
    --custom-editor-background: hsl(var(--background));

    /* --rhm */
    --rhm-rect: #2d333b;
    --rhm-text-color: #c9d1d9;
    --rhm-rect-hover-stroke: rgba(255, 255, 255, 0.14);
    --rhm-rect-active: #196127;
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
    --sidebar: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
    font-feature-settings: "rlig" 1, "calt" 1;
  }
}

html,
body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* select */
.selected {
  background-color: hsl(var(--secondary));
}

/* fts-result > b */
.fts-result b {
  color: var(--token-function-color);
}